export interface TrainMeal {
  mealId: number
  trainId: number
  mealName: string
  mealType: string
  price: number
  description: string
  imageUrl: string
  stock: number
  available: boolean
  createTime: string
  updateTime: string
}

// 餐品种类枚举
export enum MealType {
  RICE = '盖饭',
  NOODLE = '面食',
  BEVERAGE = '饮品',
  SNACK = '零食',
}

export interface TrainMealOrderItem {
  id: number
  mealId: number
  quantity: number
  price: number // 下单时的单价
  subtotal: number // 小计金额
}

export interface TrainMealOrder {
  id: number
  trainTicketOrderId: number
  items: TrainMealOrderItem[] // 订单项列表
  totalPrice: number // 订单总金额
  status: number // 0-未支付, 1-已支付, 2-已取消
  createTime: string
  paymentTime?: string
}

// 火车票订单状态枚举
export enum TicketStatus {
  PAID = 0,
  REFUNDED = 1,
  USED = 2,
}

// 火车票订单接口
export interface TrainTicketOrder {
  orderId: number
  userId: number
  trainId: number
  trainNumber: string
  departureStationId: number
  departureStationName: string
  arrivalStationId: number
  arriveStationName: string
  carriageId: number
  carriageNumber: string
  seatId: number
  seatNumber: string
  seatType: string
  passengerId: number
  departureTime: string
  arrivalTime: string
  passengerName: string
  passengerIdCard: string
  price: number
  ticketStatus: TicketStatus
  trainData: string
  paymentTime: string
}
